const books = require('koa-router')()

const { tokenVerify }  = require('../util/token')

books.prefix('/books')

books.get('/', (ctx, next) =>{

    const token = ctx.cookies.get('token')

    ctx.body = {
        token,
        data: tokenVerify(token)
    }

})


module.exports = books;